# -*- coding: utf-8 -*-
from selenium import webdriver
import sys,time
reload(sys)
sys.setdefaultencoding('utf-8')

def swWindow(driver):
	nowhandle=driver.current_window_handle
	allhandles=driver.window_handles
	for handle in allhandles:
		if handle != nowhandle:
			driver.switch_to_window(handle)

if __name__=='__main__':
	driver=webdriver.Firefox()
	swWindow(driver)
	print 'test finish'